package message.types.none;

import message.visitor.MessageVisitor;
import network.e2e.FrameReader;
import stalker.Stalker;

public class GetLastDataRequest extends CleanMessage {
  
  /**
   * Constructs a get last data request
   * @requires parameters not null
   * @param client request originator
   * @param destination the target
   */
  public GetLastDataRequest(Stalker client, Stalker destination) {
    super(client, destination);
  }
  
  /**
   * Constructs a get last data request from the net
   * @requires parameters not null
   * @param client request originator
   * @param destination the target
   * @param reader the net
   */
  public GetLastDataRequest(Stalker client, Stalker destination, FrameReader reader) {
    super(client, destination, reader);
  }
  
  @Override
  public <T> T accept(MessageVisitor<T> visitor) {
    return visitor.visit(this);
  }
  
  @Override
  public String toString() {
    return "GetLastDataRequest by " + this.getClient();
  }
  
  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof GetLastDataRequest)) {
      return false;
    }
    return super.contentEquals(obj);
  }
  
}
